<!--_meta 作为公共模版分离出去-->
<?php $this->_Ameta()?>
<!--/meta 作为公共模版分离出去-->
</head>
<body>
<div class="page-container">
	<form  method="post" action="" class="form form-horizontal" id="form-article-add">
		<input type="hidden" name="id" value="<?php echo $arr['id']?>">
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2"><span class="c-red">*</span>排序：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="<?php echo $arr['sort']?>" placeholder="" id="" name="sort">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-xs-4 col-sm-2">名称：</label>
			<div class="formControls col-xs-8 col-sm-9">
				<input type="text" class="input-text" value="<?php echo $arr['name']?>" placeholder=""  name="name">
			</div>
		</div>
		<div class="row cl">
			<div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
				<button onClick="article_save_submit();" class="btn btn-primary radius" type="submit"><i class="Hui-iconfont">&#xe632;</i> 提交</button>
				<button onClick="gb()" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
			</div>
		</div>
	</form>
</div>

<script>
	function gb(){
		//关闭 layer 弹框 自己页面
		//layer.closeAll(); //关闭所有的弹框---除了自己以外的所有子弹框

		var index=parent.layer.getFrameIndex(window.name); //获取父窗口
		parent.layer.close(index);
	}

	//提交表单
	function article_save_submit(){
		$('#form-article-add').ajaxForm({
			success:function(abc){
				abc=JSON.parse(abc);
				alert(abc.msg);
				if(abc.type==1){
					var index=parent.layer.getFrameIndex(window.name); //获取父窗口内打开的窗口
					parent.location.reload(); //刷新父窗口

					parent.layer.close(index);
				}
			}
		})
	}


</script>
<!--_footer 作为公共模版分离出去-->
<?php $this->_Afooter()?>
<!--/_footer /作为公共模版分离出去-->
</body>
</html>